import {useGlobal} from '@/utils/global-state';
import {Text, View} from 'native-base';
import React, {useState} from 'react';
export default function OrderDetail() {
  const [myVar, setMyVar] = useState(0);
  const [globalVar, setGlobalVar] = useGlobal('GLOBAL_VAR', 0);
  const [pageData, setPageData] = useState<defs.TestVO>({});
  API.test.hello.request({}).then((result) => {
    setPageData(result);
  });

  return (
    <View>
      <Text
        onPress={() => {
          setMyVar(100);
        }}>
        {myVar}
      </Text>
      <View>
        <Text>{pageData.author}</Text>
      </View>
    </View>
  );
}

OrderDetail.navigationOptions = {
  title: '订单详情',
  headerShown: true,
};
